home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / T-TPUG Old Monthly Disks / (c)t2.d64 / jumping jack.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  4KB  |  132 lines

  1. 0 REM JUMPING JACK FOR 64
  2. 5 GOSUB3000:PRINT"[147]";"INITIALIZING"
  3. 10 M=3:T=10:D=5:X=25:P=61:POKE55,16:POKE56,64:S=54272:POKE53281,1:GOTO970
  4. 20 C=7:F%=5:FORI=1024TO2041:POKEI,59:NEXT
  5. 30 POKE53280,C:FORI=1064TO1103:POKEI,53:NEXT:FORI=1264TO1303:POKEI,53:NEXT
  6. 33 FORI=1424TO1463:POKEI,53:NEXT:POKE1425,54:POKE1702,54:POKE1865,54
  7. 40 FORI=1664TO1703:POKEI,53:NEXT:FORI=1864TO1903:POKEI,53:NEXT
  8. 50 FORI=55296TO56176+39:POKEI,4:NEXT
  9. 60 FORI=55456TO55496+39:POKEI,F%:NEXT
  10. 70 FORI=55616TO55656+39:POKEI,F%:NEXT
  11. 80 FORI=55856TO55896+39:POKEI,F%:NEXT
  12. 90 FORI=56056TO56096+39:POKEI,F%:NEXT:GOSUB1000:FORI=1TO1000:NEXT
  13. 100 I=1224:POKE1302,54:POKE1425,54:POKE1702,54:POKE1865,54
  14. 110 IFI/2=INT(I/2)THENPOKEI-1,59:GOSUB720
  15. 120 IFI/2=INT(I/2)THENPOKEI,55:FORJ=1TOT:NEXT:GOTO140
  16. 130 POKEI-1,59:POKEI,56:FORJ=1TOT:NEXT:B=1264:GOSUB830
  17. 140 IFPEEK(197)=60THENGOSUB190
  18. 150 IFPEEK(I+40)=54THENPOKEI,59:GOTO240
  19. 160 IFPEEK(I+40)=60THEN760
  20. 170 I=I+1:IFI>1263THENI=1224:POKE1263,59
  21. 180 GOTO110
  22. 190 I=I-39:POKEI+39,59
  23. 200 IFPEEK(I+40)<>59ORPEEK(I+80)<>53THENSC=SC+X:POKEI-40,P:GOSUB740:POKEI-40,59
  24. 210 POKEI,55:FORJ=1TOT:NEXT:I=I+41:IFI>1263THENI=1224:POKE1263,59:POKE1223,59
  25. 220 POKE1403,59:POKE1404,59
  26. 230 FORJ=1TOT:NEXT:POKEI-41,59:POKEI,55:RETURN
  27. 240 I=1422
  28. 250 IFI/2=INT(I/2)THENPOKEI+1,59:GOSUB720
  29. 260 IFI/2=INT(I/2)THENPOKEI,58:FORJ=1TOT:NEXT:GOTO280
  30. 270 POKEI+1,59:POKEI,57:FORJ=1TOT:NEXT:B=1424:GOSUB830
  31. 280 IFPEEK(197)=60THENGOSUB330
  32. 290 IFPEEK(I+40)=54THENPOKEI,59:GOTO380
  33. 300 IFPEEK(I+40)=60THEN760
  34. 310 I=I-1:IFI<1384THENI=1422:POKE1384,59
  35. 320 GOTO250
  36. 330 I=I-41:POKEI+41,59
  37. 340 IFPEEK(I+40)<>59ORPEEK(I+80)<>53THENSC=SC+X:POKEI-40,P:GOSUB740:POKEI-40,59
  38. 350 POKEI,58:FORJ=1TOT:NEXT:I=I+39:IFI<1384THENI=1422:POKE1384,59:POKE1344,59
  39. 360 POKE1344,59:POKE1343,59
  40. 370 FORJ=1TOT:NEXT:POKEI-39,59:POKEI,58:RETURN
  41. 380 I=1624
  42. 390 IFI/2=INT(I/2)THENPOKEI-1,59:GOSUB720
  43. 400 IFI/2=INT(I/2)THENPOKEI,55:FORJ=1TOT:NEXT:GOTO420
  44. 410 POKEI-1,59:POKEI,56:FORJ=1TOT:NEXT:B=1664:GOSUB830
  45. 420 IFPEEK(197)=60THENGOSUB470
  46. 430 IFPEEK(I+40)=54THENPOKEI,59:GOTO520
  47. 440 IFPEEK(I+40)=60THEN760
  48. 450 I=I+1:IFI>1663THENI=1624:POKE1663,59:POKE1623,59
  49. 460 GOTO390
  50. 470 I=I-39:POKEI+39,59:IFPEEK(I)<>59THENSC=SC+300
  51. 480 IFPEEK(I+40)<>59ORPEEK(I+80)<>53THENSC=SC+X:POKEI-40,P:GOSUB740:POKEI-40,59
  52. 490 POKEI,55:FORJ=1TOT:NEXT:I=I+41:IFI>1663THENI=1624:POKE1663,59
  53. 500 POKE1641,59:POKE1624,59:POKE1623,59
  54. 510 FORJ=1TOT:NEXT:POKEI-41,59:POKEI,55:RETURN
  55. 520 I=1862
  56. 530 IFI/2=INT(I/2)THENPOKEI+1,59:GOSUB720
  57. 540 IFI/2=INT(I/2)THENPOKEI,58:FORJ=1TOT:NEXT:GOTO560
  58. 550 POKEI+1,59:POKEI,57:FORJ=1TOT:NEXT:B=1864:GOSUB830
  59. 560 IFPEEK(197)=60THENGOSUB610
  60. 570 IFPEEK(I+40)=54THENPOKEI,59:GOTO660
  61. 580 IFPEEK(I+40)=60THEN760
  62. 590 I=I-1:IFI<1824THENI=1862:POKE1824,59
  63. 600 GOTO530
  64. 610 I=I-41:POKEI+41,59
  65. 620 IFPEEK(I+40)<>59ORPEEK(I+80)<>53THENSC=SC+X:POKEI-40,P:GOSUB740:POKEI-40,59
  66. 630 POKEI,58:FORJ=1TOT:NEXT:I=I+39:IFI<1824THENI=1862:POKE1824,59
  67. 640 POKE1784,59:POKE1783,59
  68. 650 FORJ=1TOT:NEXT:POKEI-39,59:POKEI,58:RETURN
  69. 660 P=P+1:IFP=64THENP=61
  70. 670 D=D-1:T=T-.1
  71. 680 X=X+50:IFX>125THENX=25:D=8:T=10:C=5:F%=5
  72. 690 IFX=75THENC=0:F%=0
  73. 700 IFX=125THENC=8:F%=7
  74. 710 GOTO30
  75. 720 POKES+4,17:POKES+5,132:POKES+6,132:POKES+24,6
  76. 721 H0=28:L0=49:POKES+1,H0:POKES,L0:FORZ=1TO200:NEXT:GOSUB2000:RETURN
  77. 740 POKES+24,15:POKES+4,17:POKES+5,132:POKES+6,132
  78. 741 FORH1=21TO126:POKES+1,H1:L1=181:POKES,L1:NEXT:GOSUB2000:RETURN
  79. 760 POKES+24,15:POKES+4,17:POKES+5,33:POKES+6,132:H2=233
  80. 765 H2=H2-5:POKES+1,H2:L2=181:POKES,L2
  81. 766 POKEI,58:POKEI-40,59:POKEI+54272,0:I=I+40:IFI<1983THEN765
  82. 767 GOSUB2001
  83. 769 M=M-1:IFM=0THEN780:POKES+1,H2:L2=181:POKES,L2:NEXT:GOSUB2001
  84. 770 P=61:X=25:D=6:C=27:T=10:F%=5:POKEI,59:GOTO30
  85. 780 POKE53272,21:PRINTCHR$(147);SPC(205);"GAME OVER!":PRINT
  86. 785 PRINT"YOUR SCORE WAS";SC
  87. 790 PRINT:PRINT"PLAY AGAIN?"
  88. 800 K=PEEK(197):IFK=60THEN800
  89. 810 IFK=25THENPRINT"[147]":RUN
  90. 820 IFK=39THENPRINT"[147]GOODBYE!!";:FORW=1TO500:NEXT:PRINT"[147]":END
  91. 825 GOTO800
  92. 830 IFINT(RND(1)*D)+1<>1THENRETURN
  93. 840 L=INT(RND(1)*39)+1:IFL=20ORL=1THEN840
  94. 850 POKEB+L,60:GOSUB720:RETURN
  95. 860 DATA255,129,66,66,36,36,24,255
  96. 870 DATA66,126,66,66,66,126,66,66
  97. 880 DATA12,8,13,62,44,12,18,33
  98. 890 DATA24,16,24,24,24,16,16,24
  99. 900 DATA24,8,24,24,24,8,8,24
  100. 910 DATA24,8,88,62,26,24,36,66
  101. 920 DATA0,0,0,0,0,0,0,0
  102. 930 DATA129,66,66,66,98,34,34,34
  103. 940 DATA27,10,27,17,27,0,0,0
  104. 950 DATA59,10,11,9,11,0,0,0
  105. 960 DATA91,74,91,81,91,0,0,0,0
  106. 970 POKE53272,(PEEK(53272)AND240)+12
  107. 971 POKE56334,PEEK(56334)AND254
  108. 972 POKE1,PEEK(1)AND251
  109. 973 FORI=0TO511:POKEI+12288,PEEK(I+53248):NEXT
  110. 974 POKE1,PEEK(1)OR4
  111. 975 POKE56334,PEEK(56334)OR1
  112. 976 RESTORE:FORI=12288+53*8TO12288+64*8:READA:POKEI,A:NEXT
  113. 990 GOTO20
  114. 1000 FORI=1302TO1422STEP40:POKEI,54:NEXT:FORI=1425TO1625STEP40:POKEI,54:NEXT
  115. 1010 FORI=1702TO1862STEP40:POKEI,54:NEXT
  116. 1015 FORI=55574TO55694STEP40:POKEI,3:NEXT
  117. 1020 FORI=55697TO55897STEP40:POKEI,3:NEXT:FORI=55974TO56134STEP40:POKEI,3:NEXT
  118. 1030 POKE1865,54:POKE1905,54:POKE56137,3:POKE56177,3:RETURN
  119. 2000 POKES+4,0:POKES+5,0:POKES+6,0:RETURN
  120. 2001 POKES+6,15:POKES+4,129:POKES+5,132:POKES+6,132
  121. 2002 H3=10:L3=143:POKES+1,H3:POKES,L3:FORT=1TO1000:NEXT:GOSUB2000:RETURN
  122. 3000 PRINT"[147]TO GET POINTS, YOU MUST JUMP OVER HOLES SO THAT THE MAN IS AT ";
  123. 3002 PRINT"THE HIGHEST       POSITION OVER THE HOLE."
  124. 3010 PRINT"THE NUMBER OF POINTS INCREASES WITH THE NUMBER OF SCREENS COMPLETED."
  125. 3020 PRINT"25 PTS PER HOLE (1ST SCREEN)"
  126. 3025 PRINT"75 PTS PER HOLE (2ND SCREEN)"
  127. 3030 PRINT"125 PTS PER HOLE (3RD SCREEN)"
  128. 3040 PRINT"TO JUMP PRESS THE SPACE BAR"
  129. 3050 PRINT"PRESS SPACE BAR TO CONTINUE"
  130. 3060 GR=PEEK(197):IFGR<>60THEN3060
  131. 3070 RETURN
  132.